package com.hb.trade.client.project;

import com.hb.core.pojo.center.au.dto.UserDTO;
import com.hb.core.pojo.expert.dto.ExpertDTO;
import com.hb.core.pojo.parent.PageResult;
import com.hb.core.pojo.project.evaluation.dto.ConfirmationInfoDTO;
import com.hb.core.pojo.project.evaluation.dto.EvaluationCommitteeBidDTO;
import com.hb.core.pojo.project.evaluation.dto.EvaluationCommitteeDTO;
import com.hb.core.pojo.project.evaluation.dto.EvaluationCommitteeMembersDTO;
import com.hb.core.pojo.project.evaluation.entity.EvaluationCommitteeMembers;
import com.hb.core.pojo.project.proj.entity.BidInviterVO;
import org.fzzn.core.model.msg.Message;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 评标模块Feign接口
 *
 * @author Lix1ang
 * @date 2021-12-16 11:19:06
 */
@FeignClient("hb-project")
public interface EvaluationCommitteeClient {

    /**
     * 根据项目Id查询未被评委会选择的标段信息
     *
     * @param evaluationCommitteeDTO
     * @return
     */
    @PostMapping("/evaluationCommittee/listNotSelectSection")
    Message listNotSelectSection(@RequestBody EvaluationCommitteeDTO evaluationCommitteeDTO);

    /**
     * 评委会分页查询
     *
     * @param evaluationCommitteeDTO
     * @return
     */
    @PostMapping("/evaluationCommittee/pageEvaluationCommittee")
    Message pageEvaluationCommittee(@RequestBody EvaluationCommitteeDTO evaluationCommitteeDTO);

    /**
     * 保存评标委员会信息
     *
     * @param evaluationCommitteeDTO
     * @return
     */
    @PostMapping("/evaluationCommittee/save")
    Message saveEvaluationCommittee(@RequestBody EvaluationCommitteeDTO evaluationCommitteeDTO);

    /**
     * 评委会发布
     *
     * @param evaluationCommitteeDTO
     * @return
     */
    @PostMapping("/evaluationCommittee/publishEvaluationCommittee")
    Message publishEvaluationCommittee(@RequestBody EvaluationCommitteeDTO evaluationCommitteeDTO);

    /**
     * 根据主键Id或者标段Id查询评委会详情
     *
     * @param evaluationCommitteeDTO
     * @return
     */
    @PostMapping("/evaluationCommittee/detail")
    Message evaluationCommitteeDetail(@RequestBody EvaluationCommitteeDTO evaluationCommitteeDTO);


    /**
     * 查询评委会详情（导出用）
     *
     * @author tian
     * @date 2022-6-18 17:19
     * @param evaluationCommitteeDTO
     * @return org.fzzn.core.model.msg.Message
     */
    @PostMapping("/evaluationCommittee/detailByExport")
    Message<EvaluationCommitteeDTO> detailByExport(@RequestBody EvaluationCommitteeDTO evaluationCommitteeDTO);

    /**
     * 根据主键Id评委会详情（给专家发送短信使用）
     * @author tian
     * @date 2022-2-27 9:17
     * @param evaluationCommitteeDTO
     * @return org.fzzn.core.model.msg.Message
     */
    @PostMapping("/evaluationCommittee/detailByPushSms")
    Message<EvaluationCommitteeDTO> evaluationCommitteeDetailByPushSms(@RequestBody EvaluationCommitteeDTO evaluationCommitteeDTO);

    /**
     * 获取招标人代表列表
     *
     * @param bidInviterVO
     * @return
     */
    @PostMapping("/evaluationCommittee/getBidInviter")
    Message getBidInviter(@RequestBody BidInviterVO bidInviterVO);

    /**
     * 获取专家列表
     *
     * @param bidInviterVO
     * @return
     */
    @PostMapping("/evaluationCommittee/getExpert")
    Message getExpert(@RequestBody BidInviterVO bidInviterVO);

    /**
     * 获取评委会成员列表
     *
     * @param evaluationCommitteeDTO
     * @return
     */
    @PostMapping("/evaluationCommittee/listMembers")
    Message listMembers(@RequestBody EvaluationCommitteeDTO evaluationCommitteeDTO);

    /**
     * 删除评委会成员
     *
     * @param evaluationCommitteeMembersDTO
     * @return
     */
    @PostMapping("/evaluationCommittee/removeMember")
    Message removeMember(@RequestBody EvaluationCommitteeMembersDTO evaluationCommitteeMembersDTO);

    /**
     * 随机抽取专家并脱敏
     * @param expertDTOList
     * @return
     */
    @PostMapping("/evaluationCommittee/extractingExpert")
    Message extractingExpert(@RequestBody List<ExpertDTO> expertDTOList);

    /**
     * 根据用户名和密码，获取成员信息
     * @param userDTO
     * @return
     */
    @PostMapping("/evaluationCommittee/findMembersByIdCardAnPassword")
    Message<EvaluationCommitteeMembersDTO> findMembersByIdCardAnPassword(@RequestBody UserDTO userDTO);
    /**
     * 根据手机号和密码，获取成员信息
     * @param userDTO
     * @return
     */
    @PostMapping("/evaluationCommittee/findMembersByMobileAnPassword")
    Message<EvaluationCommitteeMembersDTO> findMembersByMobileAnPassword(@RequestBody UserDTO userDTO);
    /**
     *
     * @Description: 专家登录之后获取评标信息
     * @Author: zhongdl
     * @Date:2022/2/15 9:59
     * @param evaluationCommitteeMembers:
     * @return: {@link Message< EvaluationCommitteeMembersDTO> }
     **/
    @PostMapping("/evaluationCommittee/getEvaluationInfo")
    Message<EvaluationCommitteeMembersDTO> getEvaluationInfo(@RequestBody EvaluationCommitteeMembersDTO evaluationCommitteeMembers);

    /**
     * 保存专家的确认承诺书签字信息
     * @param id
     * @param confirmationInfoDTO
     * @return
     */
    @PostMapping("/evaluationCommittee/saveConfirmationInfo")
    Message<Boolean> saveConfirmationInfo(@RequestBody ConfirmationInfoDTO confirmationInfoDTO);

    /**
     *
     * @Description: 专家登录之后分页获取评标信息列表
     * @Author: zhongdl
     * @Date:2022/2/15 11:37
     * @param evaluationCommitteeBid:
     * @return: {@link Message< PageResult< EvaluationCommitteeBidDTO>> }
     **/
    @PostMapping("/evaluationCommittee/pageCommitteeBidBid")
    Message<PageResult<EvaluationCommitteeBidDTO>> pageCommitteeBidBid(@RequestBody EvaluationCommitteeBidDTO evaluationCommitteeBid);
    /**
     *
     * @Description: 根据评委会id查询评委会成员
     * @Author: zhongdl
     * @Date:2022/2/15 13:50
     * @param evaluationCommitteeMembersDTO:
     * @return: {@link Message< List< EvaluationCommitteeBidDTO>> }
     **/
    @PostMapping("/evaluationCommittee/listEvaluationCommitteeMember")
    Message<List<EvaluationCommitteeMembersDTO>> listEvaluationCommitteeMember(@RequestBody EvaluationCommitteeMembersDTO evaluationCommitteeMembersDTO);


    /**
     *
     * @Description: 更新评委会成员信息
     * @Author: zhongdl
     * @Date:2022/2/15 13:50
     * @param evaluationCommitteeMembersDTO:
     * @return: {@link Message< List< EvaluationCommitteeBidDTO>> }
     **/
    @PostMapping("/evaluationCommittee/updateCommitteeMembersInfo")
    Message<Boolean> updateCommitteeMembersInfo(@RequestBody EvaluationCommitteeMembersDTO evaluationCommitteeMembersDTO);
    /**
     *
     * @Description: 获得是否投票结束
     * @Author: zhongdl
     * @Date:2022/2/15 14:38
     * @param evaluationCommitteeMembers:
     * @return: {@link Message< EvaluationCommitteeMembersDTO> }
     **/
    @PostMapping("/evaluationCommittee/getVoteEndFlag")
    Message<EvaluationCommitteeMembersDTO> getVoteEndFlag(@RequestBody EvaluationCommitteeMembersDTO evaluationCommitteeMembers);
    /**
     *
     * @Description: 结束评标
     * @Author: zhongdl
     * @Date:2022/2/15 16:50
     * @param evaluationCommitteeBid:
     * @return: {@link Message< Boolean> }
     **/
    @PostMapping("/evaluationCommittee/endEvaluation")
    Message<Boolean> endEvaluation(@RequestBody EvaluationCommitteeBidDTO evaluationCommitteeBid);

    /**
     * Description: 根据标段id查询当前标段下的专家身份证号
     * @author: fengbin
     * @date: 2022/2/24 15:36
     * @param sectionId
     @return: org.fzzn.core.model.msg.Message<java.util.List<java.lang.String>>
     */
    @GetMapping("/listExpertIdCardBySectionId/listExpertIdCardBySectionId")
    Message<List<String>> listExpertIdCardBySectionId(@RequestParam("sectionId") Long sectionId);


    /**
     * 重新指定专家
     * @author tian
     * @date 2022-4-18 9:09
     * @param evaluationCommitteeDTO
     * @return org.fzzn.core.model.msg.Message<java.lang.String>
     */
    @PostMapping("/evaluationCommittee/reassignExpert")
    Message<String> reassignExpert(@RequestBody EvaluationCommitteeDTO evaluationCommitteeDTO);


    /**
     * 重新指定组长
     * @author tian
     * @date 2022-4-18 9:09
     * @param evaluationCommitteeDTO
     * @return org.fzzn.core.model.msg.Message<java.lang.String>
     */
    @PostMapping("/evaluationCommittee/reassignLeaderExpert")
    Message<String> reassignLeaderExpert(@RequestBody EvaluationCommitteeDTO evaluationCommitteeDTO);


    /**
     * @param sectionId:根据标段id查询专家列表
     * @Description:
     * @Author: zhongdl
     * @Date:2022/4/22 9:35
     * @return: {@link Message< List<  EvaluationCommitteeMembers >> }
     **/
    @PostMapping("/evaluationCommittee/listMembersBySectionId")
    public Message<List<EvaluationCommitteeMembers>> listMembersBySectionId(@RequestParam Long sectionId);
}
